/*
 * BSM6.0
 *
 * Copyright 2012-2013 (C) SINODATA CO., LTD. All Rights Reserved.
 */
package com.sinodata.bsm.inmp.conf;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author wangyazhou
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-11-17 下午1:06:27          wangyazhou        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public class MEM {

    private String jobId = "";

    private String nodeId = "";

    private String instance = "";

    public String[] toRes() {
        String[] arry = new String[3];
        arry[0] = jobId + "," + nodeId + ",16";
        arry[1] = (instance == null || instance.length() == 0) ? "MEM" + nodeId : instance;
        arry[2] = nodeId;

        return arry;
    }

    /**
     * 
     * @param typeId
     * @return
     */
    public String[] toRes(String typeId) {
        String[] arry = new String[4];
        arry[0] = jobId + "," + nodeId + ",16";
        arry[1] = (instance == null || instance.length() == 0) ? "MEM" + nodeId : instance;
        arry[2] = nodeId;
        arry[3] = typeId;
        return arry;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getInstance() {
        return instance;
    }

    public void setInstance(String instance) {
        this.instance = instance;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

}
